# benchmark app package

USER root

RUN subscription-manager register --org=$SUBSCRIPTION_ORG --activationkey=$SUBSCRIPTION_KEY && subscription-manager attach && \
    subscription-manager release --set=`cat /etc/*release | grep VERSION_ID | cut -f2 -d'"'`

RUN yum -y update && \
	yum install -y sudo && \
	${INTEL_OPENVINO_DIR}/install_dependencies/install_openvino_dependencies.sh -y dev && \
	yum clean all && rm -rf /var/cache/yum

RUN sed -i 's+$HOME/inference_engine_${samples_type}_samples_build+/opt/intel/openvino/inference_engine/samples/cpp/samples_build+g' /opt/intel/openvino/inference_engine/samples/cpp/build_samples.sh && \
    /opt/intel/openvino/inference_engine/samples/cpp/build_samples.sh

# Post-installation cleanup
RUN rm -rf /tmp && mkdir /tmp && subscription-manager unregister

USER openvino
WORKDIR /opt/intel/openvino/runtime/samples/cpp/samples_build/intel64/Release